<?php 
namespace app\api\controller\v1;
use app\api\service\StockService;

class Stock extends Base {

    protected $service;
    public function __construct(StockService $service)
    {
        parent::__construct();
        $this->service = $service;
    }

    // 显示
    public function index($page = 1, $size = 10) {
        return show(1, '成功', $this->service->page($page, $size), 200);
    }

    // 获取订单商品
    public function productByOrder() {
        return $this->service->productByOrder();
    }
    
    // 修改 添加
    public function save() {
        return $this->service->save();
    }

    // 审批
    public function audit() {
        return $this->service->audit();
    }
    
    // 审核
    public function check() {
        return $this->service->check();
    }
}